﻿using UnityEngine;
using System.Collections;

public class SoundCon : MonoBehaviour {
    public static SoundCon instance;
    public AudioClip[] soundClips;
    private GameManager manager;
	void Start () {
        manager = GameManager.getInstance();
	}
    void Awake() {
        instance = this;
    }
    public void PlaySound(int indexSound)
    {
        audio.clip = soundClips[indexSound];
        if (manager.Sound)
        {
            audio.Play();
        }
    }
}
